package com.example.coreshopapp.http;

//
//import com.example.coreshopapp.bean.AdminUiCallBack;
//import com.example.coreshopapp.bean.LoginData;
//import com.example.coreshopapp.bean.MsgNet;

import com.example.coreshopapp.app.Constants;
import com.example.coreshopapp.bean.LoginData;
import com.example.coreshopapp.bean.ResponseFormRes;
import com.example.coreshopapp.bean.ResponseRes;

import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Url;

/**
 * Created by oubama on 2017-08-05.
 */

public interface RegisterSerivce {
    @POST("login/getJwtToken")
    Call<ResponseRes<LoginData>> loginByPos(@Body RequestBody body);
//     通用的接口
//    @Headers({
//            "Authorization: Bearer YOUR_TOKEN",
//            "Content-Type: application/json" // 设置请求头
//    })
//    @POST
//    Call<MsgNet> postDataNet(@Url String url, @Body RequestBody body);

    @POST
    Call<ResponseRes> postDataNet(
            @Url String url,
            @Body RequestBody body,
            @Header("Authorization") String token
    );


    @POST
    Call<ResponseFormRes> postFormDataNet(
                    @Url String url,
                    @Body RequestBody body,  // 所有表单字段
                    @Header("Authorization") String token
                    );
}
